#ifndef _MYSTDIO_H
#define _MYSTDIO_H


#include <stdio.h>
#include <string.h>


#define SIZE 1024
#define FFLUSH_NO 1
#define FFLUSH_LINE 2
#define FFLUSH_ALL 4



typedef struct file_FILE
{
    int fileno;
    int flag;

    // 输出缓冲区
    char outbuffer[SIZE];
    int outpos;
}_FILE;


_FILE* _fopen(const char* filename, const char* mode);
int _fwrite(_FILE* fp, const char* msg, int len);
void _fclose(_FILE* fp);



#endif
